<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>

        // 1. 对象的新特性
        const uname = '迪丽热巴';

        // 如果对象的属性名称和变量的名称一致
        const obj = {
            uname,

            // 对象的方法可以简写
            fn() {
                console.log(this.uname);
            }
        }

        obj.fn();

    </script>
</body>

</html>